]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellDBus: Fix Eval() return value when disabled
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Apr 2013 13:17:11 +0000 (15:17 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Apr 2013 15:32:52 +0000 (17:32 +0200)
Eval() is expected to return a boolean success value and a string result.
However when the function is disabled (via the development-tools setting),
we return null for the latter which is not a valid string value.
Return an empty string instead.

https://bugzilla.gnome.org/show_bug.cgi?id=698959

js/ui/shellDBus.js

index 727792c13536f30efc35554ffcc691d7940c37c5..12e4b844b6188055eb873afd158e4fbd4a827975 100644 (file)
@@ -97,7 +97,7 @@ const GnomeShell = new Lang.Class({
      */
     Eval: function(code) {
         if (!global.settings.get_boolean('development-tools'))
-            return [false, null];
+            return [false, ''];
 
         let returnValue;
         let success;